// eslint-disable-next-line
import { UserLayout, BasicLayout, RouteView, BlankLayout, PageView } from '@/layouts'
import { bxAnaalyse } from '@/core/icons'

export const asyncRouterMap = [

    {
        path: '/',
        name: 'index',
        component: BasicLayout,
        meta: { title: '首页' },
        redirect: '/timetable',
        children: [
            {
                path: '/timetable',
                name: 'timetable',
                component: PageView,
                hideChildrenInMenu: true,
                redirect: '/timetable/calendar',
                meta: { title: '课程表', keepAlive: true, icon: 'clock-circle' },
                children: [
                    {
                        path: '/timetable/calendar',
                        name: 'timetable.calendar',
                        component: () => import('@/edus/timetable/Calendar'),
                        meta: { title: '课程表', keepAlive: false, hiddenHeaderContent: true },
                    },

                ],
            },

        ]
    },
    {
        path: '/account',
        name: 'account',
        component: BasicLayout,
        hideChildrenInMenu: true,
        redirect: '/account/Index',
        meta: { title: '个人中心', keepAlive: true, icon: 'smile' },
        children: [
            {
                path: '/account/Index',
                name: 'account',
                component: () => import('@/edus/account/Index'),
                meta: { title: '个人中心', keepAlive: false, hiddenHeaderContent: true },
            },

        ],
    },
    {
        path: '*', redirect: '/404', hidden: true
    }
];

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
    {
        path: '/user',
        component: UserLayout,
        redirect: '/user/login',
        hidden: true,
        children: [
            {
                path: 'login',
                name: 'login',
                component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
            },
            {
                path: 'register',
                name: 'register',
                component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
            },
            {
                path: 'register-result',
                name: 'registerResult',
                component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
            }
        ]
    },

    {
        path: '/test',
        component: BlankLayout,
        redirect: '/test/home',
        children: [
            {
                path: 'home',
                name: 'TestHome',
                component: () => import('@/views/Home')
            }
        ]
    },

    {
        path: '/404',
        component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
    }

]
